package org.hcyspartnoc.demo.pojo.dto.system;

import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import java.io.Serial;
import java.io.Serializable;

@Data
@NoArgsConstructor
public class SysRoleModifyDto implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    @NotNull(message = "角色id不能为空")
    private Integer id;
    @NotNull(message = "名称不能为空")
    @Length(min = 1, max = 20, message = "名称长度1-20")
    private String name; // 匹配数据库中的name字段
    @NotNull(message = "描述不能为空")
    @Length(max = 100, message = "描述最长为100位")
    private String description; // 匹配数据库中的description字段
}
